$(function(){
	var paramMap = params();
	var id = paramMap['id'];
	$("#frozenSupply").click(function(){
		var supplyId = id;
		
		easyDialog.open({
			  container : {
				  header : '冻结确认',
				  content : '您确定要冻结这个供应商么？',
				  yesFn : function(){
			    	$.ajax({
						url:server_url+'/rest/supplyManage/checkFrozenSupply/'+supplyId+'.do?ran='+Math.random()+"&token="+token,
						type:'get',
						data:{operator:username},
						success:function(data){
							if(data.retCode=="0000"){
//								doSearch();
								easyDialog.open({
									  container : {
										header : '提示',
									    content : '冻结成功',
									    yesFn:function(){
									    	var url=server_url+'/supplyManage/list.do';
											tl_config.last_url=url;
											tl_config.loadToWorkArea(url);
									    }
									  }
									});
							}
							else{
								easyDialog.open({
									  container : {
										  header : '提示',
									    content : data.retMsg
									  },
									  autoClose : 2000
									});
								
							} 
							
						}
					})
			    },
			    noFn : true
			  }
			});
	});
});